import {Component, ElementRef, ViewChild} from '@angular/core';


@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})


export class AppComponent<T> {
  @ViewChild('headersComponent') headersComponent;
  title = '欢迎进入梦幻空间';
  height = '';
  // tslint:disable-next-line:use-lifecycle-interface
  ngAfterViewInit() {
    this.calcContentHeight();
  }

  private calcContentHeight(): void {
    setTimeout(() => {
      this.height = `${document.documentElement.clientHeight - this.headersComponent.header.nativeElement.clientHeight}px`;
    });
  }
}
